import Frame from "../views/main/Frame.vue";
import myabsent from "../views/absent/my.vue";
import subabsent from "../views/absent/sub.vue";
import publish from "../views/inform/publish.vue";
import list from "../views/inform/list.vue";
import details from "../views/inform/detail.vue";
import add from "../views/staff/add.vue";
import stafflist from "../views/staff/stafflist.vue";
import home from "../views/home/home.vue";
import absent_index from "../views/absent/index.vue";
import inform_index from "../views/inform/index.vue";
import staff_index from "../views/staff/index.vue";

const router = [
    {
        path: '/',
        name: 'frame',
        component: Frame,
        meta:{needLogin:true},
        children:[
            {path:'/',name:'home',component:home},
            {path:'/absent',name:'absent',component:absent_index,
                meta:{
                    icon:"HomeFilled",
                    text:"考勤管理",
                },
                children:[
                    {path:'/myabsent',name:'myabsent',component:myabsent,
                        meta:{
                            icon:"UserFilled",
                            text:"个人考勤",
                        }
                    },
                    {path:'/subabsent',name:'subabsent',component:subabsent,
                        meta:{
                            icon:"User",
                            text:"下属考勤",
                        }
                    },
                ]
            },
            {path:'/inform',name:'inform',component:inform_index,
                meta:{
                    icon:"BellFilled",
                    text:"通知管理",
                },
                children:[
                    {path:'/list',name:'informlist',component:list,
                        meta:{
                            icon:"List",
                            text:"通知列表",
                        }
                    },
                    {path:'/publish',name:'informpublish',component:publish,
                        meta:{
                            icon:"CirclePlusFilled",
                            text:"发布通知",
                        }
                    },
                    {path:'/details/:pk',name:'informdetails',component:details},
                ]
            },
            
            {path:'/staff',name:'staff',component:staff_index,
                meta:{
                    icon:"UserFilled",
                    text:"员工管理",
                },
                children:[
                    {path:'/add',name:'staff_add',component:add,
                        meta:{
                            icon:"CirclePlusFilled",
                            text:"新增员工",
                        }
                    },
                    {path:'/stafflist',name:'stafflist',component:stafflist,
                        meta:{
                            icon:"List",
                            text:"员工列表",
                        }
                    },
                ]
            },
           
            
        ]
      
    }
]
export default router